package com.hoyo.service;

import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hoyo.domain.ModuleInfo;
import com.hoyo.domain.ModuleMapper;

@Service
public class ModuleServiceImpl implements ModuleService{
	
	@Autowired
	private ModuleMapper moduleMapper;

	/**
	 * 获取角色模块
	 * @param userId
	 * @return
	 */
	public List<ModuleInfo> findModuleByUserId(int userId)throws Exception {
		return moduleMapper.findModuleByUserId(userId);
	}

	@Override
	public Set<String> findRolesByAccount(String account) throws Exception {
		// TODO Auto-generated method stub
		return moduleMapper.findRolesByAccount(account);
	}

	@Override
	public List<ModuleInfo> findAllModules() throws Exception {
		return moduleMapper.findAllModules();
	}
}
